package com.jackey.sms.utils;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author 小伟
 * @version V1.0
 * @Package com.jackey.sms.utils
 * @date 2020/12/18 9:34
 * @Copyright © 2020-2021 郑州恒星科技有限责任公司
 */
@Configuration
public class CrosUtil implements WebMvcConfigurer {
    @Override
    public void addCorsMappings(CorsRegistry registry) {
        registry.addMapping("/**")
                .allowedHeaders("*")
                .allowedOrigins("*")
                .allowedMethods("*");
    }
}
